package com.example.room.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

// User 实体类
@Entity(tableName = "users")
public class User {
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "user_id")
    public long userId;

    @ColumnInfo(name = "user_name")
    public String userName;

    @ColumnInfo(name = "user_name_pinyin")
    public String userNamePinyin;

//    @ColumnInfo(name = "user_name_pinyin")
//    public String userNamePinyin;

    // 其他用户信息字段


    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", userNamePinyin='" + userNamePinyin + '\'' +
                '}';
    }
}
